from nicegui import ui


ui.add_css(
    """
    .auto-height.q-textarea {
        align-self: stretch;
    }
           
    .auto-height.q-textarea .q-field__control{
        height: 100%;
    }
           
    .auto-height.q-textarea textarea{
        resize: none;
    }
"""
)


# ui
columns = [
    {
        "name": "name",
        "label": "Name",
        "field": "name",
        "required": True,
        "align": "left",
    },
    {"name": "age", "label": "Age", "field": "age", "sortable": True},
]
rows = [
    {"name": "Alice", "age": 18},
    {"name": "Bob", "age": 21},
    {"name": "Carol"},
]


with ui.row():
    ui.table(columns=columns, rows=rows)
    ui.textarea().props("outlined ").classes("auto-height")
